build a dictionary app in javascript